package com.shenmazong.serverapisafe.controller;

import com.shenmazong.serverapisafe.filter.ApiLimit;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: server-java-demo
 * @description: TestController
 * @author: 亮子说编程
 * @create: 2020-12-01 09:09
 **/

@RestController
@RequestMapping("/test")
public class TestController {

    @GetMapping("/limit")
    @ResponseBody
    @ApiLimit(count = 5, time = 10)
    public String get() {
        return "hello world !!!";
    }
}
